/**
 * Radio Story Cards - using RFID tags to track physical story cards in an agile/lean environment.
 *
 * See http://www.radiostorycards.com for more information.
 *
 *
 * Copyright (C) 2011, Ted M. Young
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
package com.radiostorycards.domain.cards;

/**
 * Represents the Column (or Queue or State) that a story card can be in.
 *
 * @author Ted Young <tedyoung@gmail.com> @JitterTed
 */
public enum Column {
  Backlog("Backlog"),
  ToDo("To-Do"),
  Doing("Doing"),
  ReadyForAcceptance("Ready for Acceptance"),
  ReadyForTesting("Ready for Testing"),
  InTest("In Test"),
  DoneDone("Done-Done");

  private String _displayString;

  Column(String displayString) {
    _displayString = displayString;
  }

  public static Column toEnum(String displayString) {
    for( Column column : values()) {
      if (column.toString().equalsIgnoreCase(displayString)) {
        return column;
      }
    }
    throw new IllegalArgumentException("There is no Column enum with the Display String of \"" + displayString + "\"");
  }

  @Override
  public String toString() {
    return _displayString;
  }
}
